package com.hwl.demo1.service.impl;

import com.hwl.demo1.service.Operation;

/**
 * @author sentry
 * @since 2023-02-25
 */
public class Div extends Operation {

    @Override
    public double getResult(double numberA, double numberB) {
        if (numberB == 0) {
            throw new ArithmeticException("除数不能为0");
        }
        return numberA / numberB;
    }
}
